include ./rtthread_nano.mk

app_inc = \
	$(ROOT)\applications\guoli\hardware\inc \
	$(ROOT)\applications\guoli\ipc\inc \
	$(ROOT)\applications\guoli\combos \
	$(ROOT)\applications\guoli\AnoPTv8 \
	$(ROOT)\applications\guoli\vehicle

app_src = \
	$(rtthread_nano_src) \
	./applications/guoli/hardware/src/pwr.c \
	./applications/guoli/hardware/src/uart.c \
	./applications/guoli/hardware/src/motor.c \
	./applications/guoli/hardware/src/motor_pid.c \
	./applications/guoli/hardware/src/drv_pwm_dma.c \
	./applications/guoli/hardware/src/rgb_state.c \
	./applications/guoli/hardware/src/servo.c \
	./applications/guoli/hardware/src/bluetooth.c \
	./applications/guoli/hardware/src/drv_i2c.c \
	./applications/guoli/ipc/src/ringbuffer.c \
	./applications/guoli/hardware/src/encoder.c \
	./applications/guoli/hardware/src/qmi8658.c \
	./applications/guoli/combos/combos.c \
	./applications/guoli/combos/combos_run.c \
	./applications/guoli/AnoPTv8/AnoPTv8Cmd.c \
	./applications/guoli/AnoPTv8/AnoPTv8FrameFactory.c  \
	./applications/guoli/AnoPTv8/AnoPTv8Par.c  \
	./applications/guoli/AnoPTv8/AnoPTv8Run.c  \
	./applications/guoli/AnoPTv8/HWInterface.c \
	./applications/guoli/vehicle/vehicle.c




# $(info app_src = $(app_src))
app_deps = $(patsubst ./%,./build/%,$(patsubst %.c, %.d, $(app_src)))
app_objs = $(patsubst ./%,./build/%,$(patsubst %.c, %.o, $(app_src)))
app_includes = $(addprefix -I", $(addsuffix ", $(app_inc)))

# app_src += \
# 	./libraries/f421/cmsis/cm4/device_support/startup/gcc/startup_at32f421.s \
# 	./rt-thread/libcpu/arm/cortex-m4/context_gcc.S

app_deps += \
	./build/libraries/f421/cmsis/cm4/device_support/startup/gcc/startup_at32f421.d \
	./build/rt-thread/libcpu/arm/cortex-m4/context_gcc.d
app_objs += \
	./build/libraries/f421/cmsis/cm4/device_support/startup/gcc/startup_at32f421.o \
	./build/rt-thread/libcpu/arm/cortex-m4/context_gcc.o

c_flags += $(app_includes)
nC_SRCS += $(app_src)
nOBJS += $(app_objs)
nC_DEPS += $(app_deps)

# $(info app_objs: $(app_objs))
